public class StringBufferDemo {

    public StringBuffer setBuffer() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('j');
        buffer.append("kjxlkjc");
        System.out.println(buffer.charAt(1));
        System.out.println(buffer.length());
        System.out.println(buffer.capacity());
        System.out.println(buffer.indexOf("jx"));
        System.out.println(buffer.toString());
        return buffer;
    }
}
